package com.ulife.order.components.core.pay;

import com.ulife.base.entities.order.SaleOrderPay;
import com.ulife.base.entities.order.SaleOrderPayCriteria;
import com.ulife.base.logics.order.SaleOrderPayLogic;
import com.ulife.order.service.enumeration.PayStatus;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Lbq on 2016/05/25.
 */
@Component
public class OrderPay {

    @Resource
    SaleOrderPayLogic saleOrderPayLogic;

    public List<SaleOrderPay> getListBySoNo(String soNo){
        //【查询用户支付记录】
        SaleOrderPayCriteria saleOrderPayCriteria = new SaleOrderPayCriteria();
        saleOrderPayCriteria.createCriteria()
                .andSoNoEqualTo(soNo)
                .andStatusEqualTo(PayStatus.Success.value());

        return saleOrderPayLogic.list(saleOrderPayCriteria);
    }
}
